package Demo02;

public class Test {
    public static void main(String[] args) {
        Generics2<Student> generics21 = new Generics2<>();
        Generics2<Person> generics22 = new Generics2<>();
//        Generics2<Integer> generics23 = new Generics2<>();
    }
    public static void main01(String[] args) {
        Generics<Number> generics = new Generics<>();
        Generics<Integer> generics1 = new Generics<>();
        Generics<Double> generics2 = new Generics<>();
//        Generics<String> generics3 = new Generics<>();
    }
}
//T一定是Number或者Number的子类
class Generics<T extends Number> {

}

class Generics2<T extends Person> {

}


class Person {

}

class Student extends Person {

}